package com.jd.jobkeeper.server.transport;

import com.jd.jobkeeper.server.data.entity.JobInfo;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class NodeContext {

    final private ServerTransport serverTransport;
    final private Map<Long, JobInfo> jobs = new ConcurrentHashMap<>();

    public NodeContext(ServerTransport serverTransport) {
        this.serverTransport = serverTransport;
    }

    public ServerTransport getServerTransport() {
        return serverTransport;
    }

    public String nodeId(){
        return this.serverTransport.getSetupRequest().getId();
    }
}
